﻿Public Class Weight
    ' Just holds the values for a weightset
    Implements ICloneable

    Public str As Double
    Public ap As Double
    Public crit As Double
    Public haste As Double
    Public arp As Double
    Public agi As Double
    Public armor As Double
    Public hit As Double
    Public sphit As Double
    Public exhit As Double
    Public exp As Double
    Public mhdps As Double
    Public ohdps As Double
    Public mhspeed As Double
    Public ohspeed As Double
    Public tier(0 To 3, 0 To 1) As Double

    Public Function Clone() As Object Implements System.ICloneable.Clone
        Try
            Return New Weight With {.str = str, .ap = ap, .crit = crit, .haste = haste, .arp = arp, .agi = agi, .armor = armor, .hit = hit, _
            .sphit = sphit, .exhit = exhit, .exp = exp, .mhdps = mhdps, .ohdps = ohdps, .mhspeed = mhspeed, .ohspeed = ohspeed, _
            .tier = tier.Clone}
        Catch ex As Threading.ThreadAbortException
            Return New Weight With {.str = str, .ap = ap, .crit = crit, .haste = haste, .arp = arp, .agi = agi, .armor = armor, .hit = hit, _
            .sphit = sphit, .exhit = exhit, .exp = exp, .mhdps = mhdps, .ohdps = ohdps, .mhspeed = mhspeed, .ohspeed = ohspeed, _
            .tier = tier.Clone}
        Catch ex As Exception
            MessageBox.Show("An unexpected error has occurred. DK Optimize will exit.", "DK Optimize", MessageBoxButtons.OK, MessageBoxIcon.Stop, MessageBoxDefaultButton.Button1)
            ErrLogWriter.writeLog(ex)
            End
        End Try
    End Function
End Class
